package com.thread.t5;

/**
 * @author zhengzihong
 * @version 1.0.0
 * @date 2018/9/17
 * @Description
 */
public class MyThread extends Thread {

    private int count = 5;

    public MyThread(String name) {
        super();
        this.setName(name);
    }

    public MyThread() {
        super();
    }

    @Override
    public synchronized void run() {
        super.run();
        count--;
        System.out.println("由" + currentThread().getName() + "计算，count=" + count);
    }


}
